<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{margin: 0;padding: 0;list-style: none;}
        #app{
            width: 300px;
            color: #fff;
        }
        h2{
            line-height: 50px;
            background-color: #b3191b;
            padding-left: 10px;
        }
        li{
            line-height: 40px;
            background-color: #c81622;
            padding-left: 10px;
            position: relative;
        }
        img{
            position: absolute;
            top: 15px;
            right: 10px;
        }
    </style>
</head>
<body>
    <div id="app">
        <h2>
            全部商品分类
        </h2>
        <ul>
            <li v-for="(item,index) in arr">
                {{item.title}}
                <img src="images/bg.png" alt="">
            </li>
        </ul>
    </div>
</body>
<script src="js/vue.js"></script>
<script>
    let vm = new Vue({
        el:"#app",
        data:{
            arr:[
                {title:"家用电器"},
                {title:"手机 数码 相机"},
                {title:"电脑 办公"},
                {title:"家居 家具 家装"},
                {title:"男装 女装 珠宝"},
                {title:"鞋靴 箱包 钟表"},
            ]
        }
    })
</script>
</html>